﻿@page


@model RazorStudentManager.Pages.StudentPage.CreateModel

<br />
<h1 class="text-info">Create</h1>
<br />
<div class="border container p-4">
    <form method="post">
        <div class="form-group row">
            <div class="col-3">
                <label asp-for="Student.Name"></label>
            </div>
            <div class="col-6">
                <input class="form-control" asp-for="Student.Name" />
            </div>
            <span asp-validation-for="Student.Name" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3">
                <label asp-for="Student.StudentClass.ClassName"></label>
            </div>
            <div class="col-6">
                <select class="custom-select" asp-for="Student.StudentClassId" asp-items="Model.ClassList">
                    <option value="">请选择班级</option>
                </select>
            </div>
            <span asp-validation-for="Student.StudentClass.ClassName" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3">
                <label asp-for="Student.Gender"></label>
            </div>
            <div class="col-6">
                <select class="custom-select" asp-for="Student.Gender" asp-items="Html.GetEnumSelectList<Gender>()">
                    <option value="">请选择性别</option>
                </select>
            </div>
            <span asp-validation-for="Student.Gender" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3">
                <label asp-for="Student.Age"></label>
            </div>
            <div class="col-6">
                <input class="form-control" asp-for="Student.Age" />
            </div>
            <span asp-validation-for="Student.Age" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3">
                <label asp-for="Student.Phone"></label>
            </div>
            <div class="col-6">
                <input class="form-control" asp-for="Student.Phone" />
            </div>
            <span asp-validation-for="Student.Phone" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3">
                <label asp-for="Student.Address"></label>
            </div>
            <div class="col-6">
                <input class="form-control" asp-for="Student.Address" />
            </div>
            <span asp-validation-for="Student.Address" class="text-danger"></span>
        </div>

        <div class="form-group row">
            <div class="col-3 offset-3">
                <input type="submit" value="创建" class="btn btn-primary form-control" />
            </div>
            <div class="col-3">
                <a asp-page="Index" class="btn btn-success form-control text-white">返回</a>
            </div>
        </div>
    </form>

</div>

